entry: Fix input window position for icons
authorMatthias Clasen <mclasen@redhat.com>
Thu, 17 Nov 2016 17:04:35 +0000 (12:04 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 17 Nov 2016 17:04:35 +0000 (12:04 -0500)
This makes the icon in the placesview address entry and
in widget-factory's progress entry work again.

gtk/gtkentry.c

index 6c5ad6d0386d32ea62e230c3a6160b27a22b3d9e..2a55109542675a6fd37cefe60262e2bc84deccf9 100644 (file)
@@ -3321,9 +3321,6 @@ place_windows (GtkEntry *entry)
   GtkEntryPrivate *priv = entry->priv;
   EntryIconInfo *icon_info;
   GtkAllocation content_allocation;
-  GtkAllocation widget_allocation;
-
-  gtk_widget_get_allocation (GTK_WIDGET (entry), &widget_allocation);
 
   icon_info = priv->icons[GTK_ENTRY_ICON_PRIMARY];
   if (icon_info)
@@ -3332,7 +3329,7 @@ place_windows (GtkEntry *entry)
 
       gtk_css_gadget_get_border_allocation (icon_info->gadget, &primary, NULL);
       gdk_window_move_resize (icon_info->window,
-                              primary.x - widget_allocation.x, primary.y - widget_allocation.y,
+                              primary.x, primary.y,
                               primary.width, primary.height);
     }
 
@@ -3343,7 +3340,7 @@ place_windows (GtkEntry *entry)
 
       gtk_css_gadget_get_border_allocation (icon_info->gadget, &secondary, NULL);
       gdk_window_move_resize (icon_info->window,
-                              secondary.x - widget_allocation.x, secondary.y - widget_allocation.y,
+                              secondary.x, secondary.y,
                               secondary.width, secondary.height);
     }